cmake_minimum_required(VERSION 3.0.0)
project(test1 VERSION 0.1.0)

include(CTest)
enable_testing()

add_compile_options(-std=c++17)
# add_executable(test1 
#     main.cpp
# )

set(PUBLIC_SRC 
    ./src/calculate.cpp
    ./src/time.cpp
    ./src/hello.c
)
set(LIBRARY_OUTPUT_PATH ./lib)
set(creat_lib_path ${CMAKE_CURRENT_SOURCE_DIR}/build/lib)
# 创建生成库的文件夹
execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory ${public_include})
add_library(public SHARED ${PUBLIC_SRC})    #默认so会生成build目录
add_library(public_static STATIC ${PUBLIC_SRC})
set_target_properties(public_static PROPERTIES OUTPUT_NAME "public")

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)